﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JDML.FilterCondition
{
    public enum ConditionType
    {
        Equal = 0,
        GreaterThan = 1,
        GreaterOrEqual = 2,
        SmallerThan = 3,
        SmallerOrEqual = 4,
        NotEqual = 5,
        Like = 6,
        NotLike = 7
    }

    public class ConditionTypeConverter
    {
        public static string ToSymbol(ConditionType type)
        {
            switch (type)
            {
                case ConditionType.Equal:
                    return "=";
                case ConditionType.GreaterThan:
                    return ">";
                case ConditionType.GreaterOrEqual:
                    return ">=";
                case ConditionType.SmallerThan:
                    return "<";
                case ConditionType.SmallerOrEqual:
                    return "<=";
                case ConditionType.NotEqual:
                    return "<>";
                case ConditionType.Like:
                    return "Like";
                case ConditionType.NotLike:
                    return "Not Like";
                default:
                    return "=";
            }
        }
    }
}
